Signal processing method and signal processing circuit

ABSTRACT

A signal processing method includes a first step of calculating a value indicating a value obtained by multiplying a ratio of the number of times of inputting the input signal having any one of values from p to m, where m is a maximum value of values of input signal which are subject to said signal processing and p is a value smaller than m and not a minimum value of the input signal, within a predetermined period to the number of times of inputting the input signal within the predetermined period, by the variable range of the converted value; and a second step of subtracting the calculated value from a maximum value within the variable range of the converted value or a value near the maximum value, wherein the input signal is converted according to the conversion characteristic specified based on a value obtained by subtraction.

RELATED APPLICATIONS

This application is a division of application Ser. No. 11/051,179, filedFeb. 7, 2005, that matured to U.S. Pat. No. 7,631,026, issued Dec. 8,2009, which is incorporated by reference herein in its entirety, as iffully set forth herein, and claims the benefit of priority under 35U.S.C. §119, based on Japanese Priority Application Nos. 2004-038973,filed Feb. 16, 2004, and 2005-020042, filed Jan. 27, 2005, which areincorporated by reference herein in their entirety, as if fully setforth herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a signal processing method and a signalprocessing circuit adapted to a processing for converting an inputsignal.

2. Description of the Related Art

There has been conventionally proposed, as a method for converting agamma characteristic (γ-characteristic) of an input image, a methoddisclosed in Japanese Patent Application Laid-Open No. 3-126377 andJapanese Patent No. 2512562.

With this method, the number of histograms corresponding to one imageplane of the input image is counted, the histograms are subjected to alimit processing, a constant addition processing, and the like, and acumulative histogram is calculated.

To use the cumulative histogram thus calculated as a gamma table, thecumulative histogram is normalized (scaled) so that a maximum value ofthe cumulative histogram is a maximum output of the gamma table.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention, there is provideda signal processing method for converting an input signal into aconverted value within a predetermined variable range according to apredetermined conversion characteristic, the method comprising: a firststep of calculating a value that indicates a value obtained bymultiplying a ratio of the number of times of inputting the input signalhaving any one of values from p to m, where the value m is a maximumvalue of values of input signal which are subject to said signalprocessing and the value p is a value smaller than the value m and not aminimum value of the input signal, within a predetermined period to thenumber of times of inputting the input signal within the predeterminedperiod, by the variable range of the converted value; and a second stepof subtracting the value calculated at the first step from a maximumvalue within the variable range of the converted value or a value nearthe maximum value, wherein the input signal is converted according tothe conversion characteristic specified based on a value obtained bysubtraction at the second step.

According to a second aspect of the present invention, it is preferablethat the signal processing method according to the first aspect of theinvention further comprises a step of specifying the conversioncharacteristic, wherein the step is a step of dividing the variablerange of the input signal into a plurality of ranges, and of specifyingthe conversion characteristic corresponding to a frequency at which theinput signal belonging to each of the divided ranges is input, withinthe predetermined period, and the conversion characteristic specified atthis step includes, as the conversion characteristic corresponding toinput signals having the values p to m, the conversion characteristicspecified by an interpolated value obtained by performing aninterpolation using at least the value obtained at the second step andthe maximum value within the variable range of the converted value orthe value near the maximum value as interpolation source data.

It is particularly preferable to specify the conversion characteristicso that the frequency of the converted value corresponding to the range(region) having a high frequency is high (so that the number of inputsignals belonging to the range (region) is large). In addition, thepresent invention is particularly preferably used for an image signalprocessing. The predetermined period is preferably a period during whichsignals corresponding to an image of one image plane (more specificallyone field or one frame) are input.

A configuration of performing the interpolation using at least the twovalues as the interpolation source data can be, for example, a linearinterpolation. However, the other interpolation method can be adopted.For example, if an interval between the value obtained at the secondstep and the substantially maximum value within the variable range ofthe converted value is linearly interpolated and the input signal hasthe value p, the value obtained at the second step is output as anoutput value. However, the present invention is not limited to this. Forexample, if a discontinuity of the conversion characteristic from aconversion characteristic in the other range of the input signal (e.g.,the range from q to p to be described later), an interpolation methodother than the linear interpolation can be adopted by further using theother interpolation source data (e.g., a value obtained at a fourth stepto be described later).

In the present invention, an expression of “a maximum value of possiblesignal processing target values (a maximum value of values which aresubject to said signal processing)” is used. This is because thefunction of the present invention can be attained even if the value isnot strictly equal to the maximum value of the input signal. If theinput signal belonging to the range from p to m, for example, itsuffices that the value m is not strictly equal to the maximum value ofthe input signal but may be a maximum value of the possible signalprocessing target values of the input signal (a value for calculating avalue that indicates a value obtained by multiplying the ratio of thenumber of times of inputting the input signal during the predeterminedperiod to the number of input signals during the predetermined period,by the variable range of the converted value). More specifically, if thepossible values of the input signal are 0 to 255 and the maximum valueof the possible signal processing target values is 254, the maximumvalue is 254. In light of this respect, the present application uses theexpression of “a maximum value of possible signal processing targetvalues (a maximum value of values which are subject to said signalprocessing)”.

Furthermore, in the present invention, an expression of a maximum valueor “a value near the maximum value” is used. This is because thetechnical concept of the present invention does not require that thevalue is strictly equal to the maximum value. The “value near themaximum value” means herein is a value which a person who carries outthe present invention can set within the scope of the technical conceptof the present invention, preferably a value within a range from −1% to+1% of the maximum value.

According to a third aspect of the present invention, it is alsopreferable that the signal processing method according to the firstaspect of the present invention further comprises: a third step ofcalculating a value that indicates a value obtained by multiplying aratio of the number of times of inputting the input signal having anyone of values q to p, where the value q is a value smaller than thevalue p and that is not the substantially minimum value of the inputsignal, within the predetermined period to the number of times ofinputting the input signal within the predetermined period, by thevariable range of the converted value; and a fourth step of calculatinga value obtained by subtracting the value calculated at the third stepfrom the value calculated at the second step, wherein the conversioncharacteristic includes, as the conversion characteristic correspondingto the input signals having the values q to p, the conversioncharacteristic specified by an interpolated value obtained by performingthe interpolation using at least the value obtained at the fourth stepand the value obtained at the second step as the interpolation sourcedata.

In the above and the following description, a notation of n^(th) step isused. However, this is used simply to discriminate the respective stepsfor the sake of convenience and not intended to limit the presentinvention to a configuration of sequentially executing the respectivesteps in this order.

Further, the step of calculating the value obtained by subtracting thevalue calculated at the third step from the value calculated at thesecond step is not limited to a configuration of actually performing anoperation of subtracting the value obtained at the third step from thevalue obtained at the second step. The step may be, for example, a stepof obtaining the value desired at this step by performing the otheroperation of, for example, subtracting a sum of the value obtained atthe first step and the value obtained at the third step from thesubstantially maximum value within the variable range of the convertedvalue.

It is desirable that a plurality of ranges (including both of or one ofa range from p to m and a range from q to p) are not overlapped with oneanother for accuracy purposes. However, they may be slightly overlapped.Accordingly, if the above-stated aspects of the invention and thefollowing aspects of the invention include the requirement of adjacentranges such as the range from p to m and the range from q to p, it ispreferable to deal with the value (e.g., p) considered to be included inone of the ranges so as not to be included in the other range. If therange equal to or greater than p and equal to or smaller than m isconsidered as the range from p to m, it is preferable that the rangefrom q to p does not include the value p. However, an instance in whichboth the range from p to m and the range from q to p include the value palso falls within the range of the present invention.

According to a fourth aspect of the present invention, it is furtherpreferable that the signal processing method according to the firstaspect of the present invention further comprises: a fifth step ofcalculating a value that substantially indicates a value obtained bymultiplying a ratio of the number of times of inputting the input signalhaving any one of values from the substantially minimum value (theminimum value of the possible signal processing target values) of theinput signal to a value r that is a predetermined value smaller than thevalue p within the predetermined period to the number of times ofinputting the input signal within the predetermined period, by thevariable range of the converted value, wherein the conversioncharacteristic includes, as the conversion characteristic correspondingto the input signals having the minimum value of the possible signalprocessing target values of the input signal (the minimum value ofvalues of input signals which are subject to said signal processing) tothe value r, the conversion characteristic specified by an interpolatedvalue obtained by performing the interpolation using at least a minimumvalue within the variable range of the converted value or a value nearthe minimum value and the value obtained at the fifth step as theinterpolation source data.

According to a fifth aspect of the present invention, it is furtherpreferable that the signal processing method according to the firstaspect of the present invention further comprises: a sixth step ofcalculating a value that substantially indicates a value obtained bymultiplying a ratio of the number of times of inputting the input signalhaving any one of values from the value r to a value s, where the values is a predetermined value smaller than the value p, within thepredetermined period to the number of times of inputting the inputsignals within the predetermined period, by the variable range of theconverted value; and a seventh step of calculating a value obtained byadding up the value calculated at the fifth step and the valuecalculated at the sixth step, wherein the conversion characteristicincludes, as the conversion characteristic corresponding to the inputsignals having the values r to s, the conversion characteristicspecified by an interpolated value obtained by performing theinterpolation using the value obtained at the fifth step and the valueobtained at the seventh step as the interpolation source data.

The invention according to the fourth or fifth aspect of the inventioncan be combined with the third aspect of the invention. If so, the valuer is preferably a value smaller than q.

According to a sixth aspect of the present invention, there is provideda signal processing method for converting an input signal into aconverted value within a predetermined variable range according to apredetermined conversion characteristic, the method comprising: aneighth step of counting the number of times of inputting the inputsignal having any one of values from p to m, where the value m is amaximum value of possible signal processing target values of the inputsignal and the value p is a value that is smaller than the value m andthat is not a substantially minimum value of the input signal, within apredetermined period; a ninth step of subtracting the counted numberfrom a value obtained by multiplying a substantially maximum valuewithin the variable range of the converted value by a predeterminednumber; and a tenth step of calculating a value that substantiallyindicates a value obtained by dividing a value obtained by subtractionat the ninth step by the predetermined number, wherein the convertedvalue is converted according to the conversion characteristic specifiedbased on the value calculated at the tenth step.

The present invention can provide the signal processing method capableof realizing the conversion processing by the simple operation. Inaddition, by applying the present invention to a television signal imageprocessing, a gamma conversion method for appropriately converting agamma characteristic according to an input image, and for obtaining agood sense of contrast can be provided.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a circuit block diagram that depicts a signal processingmethod according to embodiments of the present invention;

FIG. 2 is a flowchart that depicts procedures for a signal processingmethod according to a first embodiment of the present invention;

FIG. 3 is a detailed view of a histogram counter according to the firstembodiment;

FIG. 4 is a chart that depicts histograms corresponding to a certainframe;

FIG. 5 is a detailed view of a cumulative operation unit;

FIG. 6 depicts cumulative data on the certain frame;

FIG. 7 depicts a gamma characteristic linearly interpolated by aninterpolation unit;

FIGS. 8A to 8C depict an example of processing a dark input image;

FIGS. 9A to 9C depict an example of processing a bright input image;

FIG. 10 is a detailed view of a histogram counter according to a secondembodiment of the present invention;

FIG. 11 is a flowchart that depicts processing procedures for a signalprocessing method according to a third embodiment of the presentinvention;

FIG. 12 is a detailed view of a histogram counter according to the thirdembodiment of the present invention; and

FIG. 13 depicts a cumulative operation unit according to the thirdembodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Best embodiments for carrying out the present invention will bedescribed hereinafter. According to the embodiments, a conversionprocessing that does not change a maximum converted value irrespectiveof a change in an input signal by a simple operation can be realized.

First Embodiment

FIG. 1 is a circuit block diagram that depicts a signal processingmethod according to embodiments of the present invention. FIG. 2 is aflowchart that depicts processing procedures for a signal processingmethod according to a first embodiment.

Reference symbol 1 denotes an image data input terminal, 2 denotes ahistogram counter (corresponding to a counter unit and a division unit),3 denotes a cumulative operation unit (corresponding to an operationunit), 4 denotes an interpolation unit, 5 denotes a gamma table(corresponding to a conversion unit), and 6 denotes a display unit.

Image data s such as luminance data (Y data) or RGB data is input to theinput terminal 1. In this embodiment, the image data s is assumed to bedigital data of eight bits. For brevity of description, FIG. 1 showsthat data input to the histogram counter 2 is equal to data input to thegamma table 5. However, the present invention is not limited to this.The luminance data may be input to the histogram counter 2 whereas theRGB data obtained by subjecting the luminance data to a color spaceconversion may be input to the gamma table 5. In this embodiment, aninput signal has a variable range from 0 to 255, and a maximum value mhas 255 tones.

The histogram counter 2 counts the number of histograms corresponding toone frame of the input image data. FIG. 3 is a detailed view of thehistogram counter 2. Reference symbol 10 denotes a category decoder, 11to 15 denote counters, and 21 to 25 denote division units.

The image data s is input to the decoder 10, in which the image data sis category-decoded using higher three bits among the eight bits ofdata. The number of pixels having higher three bits of 000 (O to 31tones) is counted by the counter 11, the number of pixels having higherthree bits of 001 (32 to 63 tones) is counted by the counter 12, and thenumber of pixels having higher three bits of 010 (64 to 95 tones) iscounted by the counter 13. In addition, the number of pixels havinghigher three bits of 110 (192 to 223 tones) is counted by the counter14, and the number of pixels having higher three bits of 111 (224 to 255tones) is counted by the counter 15. Namely, the variable range of theinput signal is divided into ranges of 0 to 31(r), 32 to 63(s), 64 to95, 192(q) to 223, and 224(p) to 255, and the number of pixels of theinput signal belonging to each of the ranges is counted. Symbols inparentheses show correspondence between values r, s, q, and p set forthin claims and values described in this embodiment.

Normally, if an image signal is decoded using higher three bits of thesignal, the number of histograms in eight categories of 000, 001, 010,011, 100, 101, 110, and 111 are counted. In this embodiment, however,the number of histograms only in three lower tone-side categories (000,001, and 010) and two higher tone-side categories (110 and 111), i.e.,five categories in all are counted (at a step S1). A count value of eachof the counters is divided by the number of input signals correspondingto one frame (2073600 because of an image size of 1920×1080), whereby aratio of the number of input signals belonging to each divided range tothe total number of input signals corresponding to one frame can becalculated. A division result is multiplied by 256 that is the variablerange of the converted value, whereby a result of appropriately scalinga frequency of each range to specify a conversion characteristic can beobtained. However, as will be described later, according to the presentinvention, a value corresponding to the frequency of each highertone-side range is obtained based on a substantially maximum value inthe variable range of the converted value by subtraction. It isunnecessary to perform a strict calculation. In this embodiment,therefore, an approximation calculation is performed as follows.

The counters 11 to 15 include latch circuits, not shown, respectively.When each of the respective counters 11 to 15 finishes counting thenumber of histograms corresponding to one frame, the counter outputshistogram data on one frame to each of the division units 21 to 25 inthe next stage using a vertical synchronization signal.

Each of the division units 21 to 25 divides the histogram datacorresponding to one frame and output from each of the counters 11 to 15by a fixed value, thereby scaling the data to have an appropriate levelfor the gamma table (at a step S2). This division may be a simpledivision. In this embodiment, bit shift is performed as the division.

In this embodiment, the gamma table 5 is assumed to output eight bits ofdata. Namely, the variable range of the converted value output afterbeing subjected to the gamma conversion is 0 to 255. The input imagesize is 1920×1080 (=2073600) (corresponding to the number of inputsignals input during a predetermined period). Accordingly, a value (anapproximate value in this embodiment) that indicates a value obtained bymultiplying the ratio of the count value to the total number of inputsignals corresponding to one frame, by the variable range of theconverted value can be obtained by dividing the count value by 8192. Theoperation of dividing the count value by 8192 can be realized by adigital processing of shifting data to the right by 13 bits. Each of thedivision units 21 to 25, therefore, shifts the input histogram data tothe right by 13 bits (corresponding to division of the data by 8192). Asa result, the pieces of histogram data fall within the eight-bit range,so that appropriate values for the gamma table 5 that outputs eight bitscan be obtained.

Consequently, pieces of histogram data h1 to h5 in the three lowertone-side categories and the two higher tone-side categories areobtained. FIG. 4 depicts the histogram data on a certain frame.

The pieces of histogram data h1 to h5 output from the histogram counter2 are input to the cumulative operation unit 3 in the next stage. FIG. 5is a detailed view of the cumulative operation unit 3.

The cumulative operation unit 3 obtains pieces of cumulative data r1,r2, and r3 from the histogram data h1, h2, and h3 in the three lowertone-side categories by the following calculation, respectively (at astep S3).r1=h1r2=h1+h2=r1+h2r3=h1+h2+h3=r2+h3  (1)

As for the histogram data h4 and h5 in the two higher tone-sidecategories, a cumulative operation is performed from a higher tone side(255 tone side), and resultant cumulative data is subtracted from amaximum output value (hereinafter, “MaxOut”) of the gamma table 5. As aresult, the following pieces of cumulative data r4 and r5 are obtained(at a step S4)r5=MaxOut−h5r4=MaxOut−(h5+h4)=r5−h4  (2)

In the equations (2), if the gamma table 5 outputs eight bits, theMaxOut is 255. In this embodiment, the MaxOut is a maximum value in thevariable range of the converted value. If the pieces of histogram datacounted in one frame is those shown in FIG. 4, pieces of the cumulativedata r1 to r5 obtained by the cumulative operation unit 3 are thoseshown in FIG. 6.

The interpolation unit 4 interpolates the cumulative data r1 to r5obtained by the cumulative operation unit 3, and generates the gammatable (at a step S5).

As shown in FIG. 6, in this embodiment, the cumulative data r1 is anoutput having 31 tones, the cumulative data r2 is an output having 63tones, the cumulative data r3 is an output having 95 tones, thecumulative data r4 is an output having 191 tones, and the cumulativedata r5 is an output having 223 tones. In addition, the output having255 tones is fixed to the MaxOut that is 255. A value p smaller than themaximum m (=255) of the input signal corresponds to 224.

In this embodiment, these pieces of cumulative data r1 to r5 arelinearly interpolated, thereby generating the gamma table. In FIG. 7,reference symbol 30 denotes a gamma conversion characteristic curveobtained by linearly interpolating the pieces of cumulative data shownin FIG. 6. By writing this gamma conversion characteristic curve to thegamma table, the image data s is subjected to a gamma conversion andresultant data is displayed on the display unit 6 (at a step S6).

In this embodiment, the interpolation unit 4 performs the linearinterpolation. However, the present invention is not limited to this andthe interpolation unit 4 may perform a polynomial interpolation, aspline interpolation, or the like.

Examples of processing the image according to the above-statedconfiguration will now be described with reference to FIGS. 8A to 8C and9A to 9C.

FIGS. 8A to 8C depict an example in which the input image is a darkimage. FIG. 8A depicts the input image, FIG. 8B depicts pieces ofhistogram data, and FIG. 8C depicts pieces of cumulative data and thegamma conversion characteristic. As shown in FIG. 8B, the pieces ofhistogram data h1 to h5 counted by the histogram counter 2 are such thatthe pieces of lower tone-side histogram data have high frequencies. Ifthese pieces of histogram data h1 to h5 are subjected to the cumulativeoperation and the linear interpolation, the gamma characteristic havinga high inclination on the lower tone side and a low inclination on thehigher tone side is obtained as shown in FIG. 8C. As a result, an imagewhich has a dark part in an enhanced contrast and which is, therefore,easily visible can be obtained.

On the other hand, FIGS. 9A to 9C depict an example in which the inputimage is a bright image. As shown in FIG. 9B, the pieces of histogramdata h1 to h5 are such that the pieces of higher tone-side histogramdata having high frequencies. If these pieces of histogram data h1 to h5are subjected to the cumulative operation and the linear interpolation,the gamma characteristic having a low inclination on the lower tone sideand a high inclination on the higher tone side is obtained as shown inFIG. 9C. As a result, an image which has a bright part in an enhancedcontrast and which is, therefore, easily visible can be obtained.

As stated above, according to the first embodiment, a good sense ofcontrast can be acquired according to the input image. In addition,during generation of the gamma table, the maximum output value of thegamma table can be fixed to a desired value even by the simple divisionsuch as the bit shift with respect to the cumulative data. The circuitcan be, therefore, constituted to be simple.

Namely, according to this embodiment, signal processing with highaccuracy can be performed without performing a process such as dividinga cumulative histogram by the maximum output value of the cumulativehistogram and multiplying the maximum output data of the gamma table.

In this embodiment, each histogram data is category-decoded using higherthree bits of the data during counting the number of histograms.However, the present invention is not limited to this, and the histogramdata may be decoded using all eight bits or the other number of bits. Inthis embodiment, the pieces of histogram data in the three lowertone-side categories and in the two higher tone-side categories arecounted. However, the present invention is not limited to this.

Second Embodiment

A processing block diagram according to a second embodiment of thepresent invention is shown in FIG. 1 similarly to the first embodiment.The second embodiment differs from the first embodiment in aconfiguration of the histogram counter 2.

FIG. 10 is a detailed view of the histogram counter 2 (corresponding toa counter unit) according to the second embodiment.

In FIG. 10, reference symbol 10 denotes a category decoder, 51 denotes afirst counter, 52 denotes a comparator, and 53 denotes a second counter.

Image data s of eight bits is decoded by the category decoder 10 usinghigher three bits of the image data s. A processing performed by thecategory decoder 10 is the same as that performed by the categorydecoder 10 according to the first embodiment.

In FIG. 10, category-decoded signals are equally processed in allcategories. Therefore, FIG. 10 shows only a data processing block forthe higher three bits of 000 and does not show data processing blocksfor the higher three bits of 001 to 111.

The counter 51 counts a frequency of pixels having the higher three bitsof 000. Frequency data thus counted is output to the comparator 52 inthe next stage. A preset pre-scale value is input to the comparator 52in advance. If the frequency data output from the first counter 51 isequal to the pre-scale value, the comparator 52 outputs a reset signalsr. If a gamma table outputs eight bits and an input image size is1920×1080, for example, the pre-scale value can be set at 8192.

The reset signal sr is input to the first counter 51 and the secondcounter 53. When the reset signal sr is input to the counter, thecounter resets its count value at zero and counts the frequency of thepixels again. The second counter 53 counts the number of times ofinputting the reset signal sr.

By thus constituting the histogram counter 2, a result of dividing thefrequency data by the pre-scale value which is an integer can beobtained as an output of the second counter 53. As a result, the data isscaled to have an appropriate level for the gamma table. An output ofthe histogram counter 2 is processed similarly to the first embodiment.

Third Embodiment

A processing block diagram according to a third embodiment of thepresent invention is shown in FIG. 1 similarly to the first embodiment.

FIG. 11 is a flowchart that depicts processing procedures for a signalprocessing method according to a third embodiment. The third embodimentdiffers from the first embodiment in a configuration of the histogramcounter 2 (corresponding to a counter unit) and that of the cumulativeoperation unit 3 (corresponding to an operation unit and a divisionunit).

FIG. 12 is a detailed view of the histogram counter 2 according to thethird embodiment.

The histogram counter according to the third embodiment is constitutedso that the division units 21 to 25 are removed from the histogramcounter according to the first embodiment. Due to this, the histogramcounter outputs non-scaled histogram data h1 to h5 (at a step S11).

These pieces of histogram data h1 to h5 are input to the cumulativeoperation unit 3. FIG. 13 is a detailed view of the cumulative operationunit 3. The cumulative operation unit 3 calculates cumulative data r1′to r5′ first by the similar calculation as that according to the firstembodiment (at steps S12 and S13). Equations (3) for calculating thecumulative data r1′ to r5′ are as follows.r1′=h1r2′=h1+h2=r1′+h2r3′=h1+h2+h3=r2′+h3r5′=MaxOut′−h5r4′=MaxOut′−(h5+h4)=r5′−h4  (3)

If the gamma table outputs eight bits, the MaxOut′ is a value obtainedby shifting 255 to the left by predetermined bits (assumed as “A bits”)(corresponding to a value obtained by multiplying 255 by 2^A times).This corresponds to a multiplication of a maximum value in the variablerange of the converted value by a predetermined number, i.e., 2 raisedto an A^(th) power. This bit shift amount A is set equal to a bit shiftamount obtained by a bit shift performed by each of division units 61 to65 to be described later.

The pieces of cumulative data r1′ to r5′ thus obtained are input to thedivision units 61 to 65, respectively. Each of the division units 61 to65 divides each cumulative data by a fixed value, thereby scaling thedata to have an appropriate level for the gamma table (at a step S14).This division may be a simple division. In this embodiment, bit shift isperformed as the division.

If the input image size is 1920×1080, for example, each data can beappropriately scaled by shifting the data to the right by 13 bits(corresponding to a division of the data by 8192). If so, the shiftamount A of the MaxOut′ is 13 (MaxOut′=255×8192).

The pieces of cumulative data r1′ to r5′ thus calculated areinterpolated by the interpolation unit 4 similarly to the firstembodiment, thereby generating the gamma table (at a step S15).

Similarly to the first embodiment, this gamma conversion characteristiccurve is written to the gamma table 5 (corresponding to a conversionunit), whereby the image data is subjected to a gamma conversion andresultant data is displayed on the display unit 6 (at a step S16).

This application claims priority from Japanese Patent Application No.2004-38973 filed Feb. 16, 2004, and Japanese Patent Application No.2005-020042 filed Jan. 27, 2005, which are hereby incorporated byreference herein.

What is claimed is:
 1. A signal processing circuit for converting aninput signal into a converted value within a predetermined variablerange according to a predetermined conversion characteristic, the signalprocessing circuit comprising: a dividing unit that divides the variablerange of the input signal into a plurality of ranges; a first counterunit that counts the number of times of inputting the input signalhaving any one of values from p to m, where the value m is a maximumvalue of values of input signals which are subject to the signalprocessing circuit and the value p is a value smaller than the value mand not a minimum value of the input signal, within a predeterminedperiod; a second counter unit that counts the number of times ofinputting the input signal having any one of values from the minimumvalue of values of input signals which are subject to the signalprocessing circuit to a value r within the predetermined period; a firstspecifying unit that specifies the conversion characteristiccorresponding to input signals within a range of value p to value m; asecond specifying unit that specifies the conversion characteristiccorresponding to input signals within a range of the minimum value ofvalues of input signals which are subject to the signal processingcircuit to value r; an intermediate-range unit that specifies theconversion characteristic corresponding to input signals having thevalues r to p; a converting unit that converts the input signals byusing the specified conversion characteristics; and an interpolationunit; wherein the first specifying unit comprises: an operation unitthat calculates a first value obtained by subtracting a count value ofthe first counter unit, from a value obtained by multiplying a maximumvalue within the variable range of the converted value or a value nearthe maximum value by a predetermined number; and a first division unitthat calculates a second value that indicates a value obtained bydividing the first value by the predetermined number; wherein theinterpolation unit specifies the conversion characteristic correspondingto input signals having the values p to m by an interpolated valueobtained by performing an interpolation using at least the second valueand the maximum value within the variable range of the converted valueor the value near the maximum value as interpolation source data; andwherein the second specifying unit comprises: a second division unitthat calculates a third value that indicates a value obtained bydividing a count value of the second counter unit by the predeterminednumber; wherein the interpolation unit specifies the conversioncharacteristic corresponding to input signals having the minimum valueof values of input signals that are subject to the signal processingcircuit to the value r by an interpolated value obtained by performingan interpolation using at least the third value and a minimum valuewithin the variable range of the converted value or a value near theminimum value as the interpolation source data.